x86emul: correct behavior for single iteration REP INS/OUTS
authorJan Beulich <jbeulich@suse.com>
Thu, 2 Feb 2017 11:48:59 +0000 (12:48 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 2 Feb 2017 11:48:59 +0000 (12:48 +0100)
commit061cd0f0e5c41335150e0d234d8ad0aff7b6da11
tree1f2bb6dc813d4bb8f540ad3f47b4f042084ce7a2
parent8844ed299a88848da88b23e6db43b5bcc4ad4bee
x86emul: correct behavior for single iteration REP INS/OUTS

The initial operation done on these paths may raise an exception (for
->read_io() that's possible only on the PV path, when the I/O port
access check has been deferred). We have to suppress put_rep_prefix()
updating rCX in that case. From an abstract perspective this also
applies to RETRY being returned.

Reported-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Tested-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/x86_emulate/x86_emulate.c